home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
examples
/
chap06
/
DynamicGen.wrl
< prev
next >
Wrap
Text File
|
1996-10-14
|
466b
|
23 lines
#VRML V2.0 utf8
#
# dynamic generation of geometry nodes
#
# the place where new nodes are put.
DEF GEN_ROOT Transform{
children[
DEF GEN_TOUCH TouchSensor{},
Shape{geometry Sphere{}}
]
}
DEF GEN_SCRIPT Script{
url "DynamicGen.class"
eventIn SFTime touched
eventOut MFNode addSphere
}
ROUTE GEN_TOUCH.touchTime TO GEN_SCRIPT.touched
ROUTE GEN_SCRIPT.addSphere TO GEN_ROOT.addChildren